(ns main-test
  (:use model.vector3D)
  (:use [clojure.test]))

(require ['model.vector3D :as 'vector3D])


(deftest vector3d-test
  (testing "vector add. function"
    (is (= (vector3D/make 1 2 3)
           (vector3D/add
             (vector3D/make 1 2 3)
               (vector3D/make)))))
  
  (testing "vector sub. function"
    (is (= (vector3D/make -1 -2 -3)
           (vector3D/sub
             (vector3D/make)
               (vector3D/make 1 2 3)))))
  
  (testing "vector norm function"
    (is (= 5 (vector3D/norm
               (vector3D/make 3 0 4)))))

  (testing "vector mul. bay scalar"
    (is (= (vector3D/make 0 0.5 5)
           (vector3D/s-mul (vector3D/make 0 0.1 1) 5)))))